<!DOCTYPE html>
<html>
<head> 
	<title>安装通-中国智慧安装采供服务平台</title>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<meta http-equiv = "X-UA-Compatible" content = "IE=edge,chrome=1" />
	<meta name="description" content="安装通（azt365.com）中国大型的b2b电子商务智慧化平台,整合了国内安装行业内采购商与供应商,打通上下游产业链,信息透明共享,通过云平台,大数据,为各大企业供应商提供产品信息、企业推广,为您提供全面的安装行业资讯金融服务以及线上支付.">
	<meta name="keywords" content="安装通,azt365,江苏b2b电子商务,江苏建筑采供批发平台,江苏弱电批发,江苏消防报警系统,江苏智慧安装建筑安装,江苏安防监控系统,江苏通风设备安装,江苏通风工程安装,江苏通风工程施工,江苏消防工程材料批发,江苏消防工程材料">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link href="/res/css/common/style.css" rel="stylesheet">
	<link href="/res/css/common/css.css" rel="stylesheet">
	<link href="/res/css/common/azt.css" rel="stylesheet">
	<style type="text/css">
	button { border: none; }
	input[type="button"] { border: none; }
	input[type="text"] {font-size: 14px;}
	input[type="password"] {font-size: 14px;}
	.loginIntro{
		width: 1200px; 
		position: absolute;
		left: 50%;
		top: 50%;
		margin-top: -115px;
		margin-left: -600px;
	}
	</style>
  </head>
  <body>
  <div style="height:90px;background:white;">
	<div class="top">
		<img src="/res/images/logoAzt/indexlogo.jpg" style="margin-top:13.5px;float:left;cursor: pointer;" onclick="window.open('/')"/>
		<big style="margin-top: 13.5px;">[#if type?? && type == 'register']注册[#else]欢迎登录[/#if]</big>
		<small>400-848-1365</small>
		<img src="/res/images/common/a_06.jpg" class="topImgSec"/>
	 </div>
  </div>   
   
  <div class="logiinBody">
  	<div class="loginIntro">
  		<img src="/res/images/common/loginIntro.png"/>
  	</div> 
	<div class="loginOuter">
		<div class="inputDiv regForm" style="top:0; [#if type?? && type == 'register']left:25px;[#else]left:350px;[/#if]">
			<h6>账号注册</h6> 
			<small style="visibility:hidden;position: relative;" id="registerError">
			    <img src="/res/images/oparaStatus/noticeCl_11.jpg" style="position: absolute;top:5px;left:10px;"/>  
				<span style="margin-left: 15px;display: inline-block;"></span>
			</small>
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
			<input placeholder="手机/邮箱" type="text" id="regsAccont" name="username" onblur="checkUserNameForRegister(true)" style="border: none;"/>
		 
			</div>
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
			<input placeholder="密码" name="password" type="password" style="border: none;"/> 
			</div>
			<div style="padding:0;">
				<input placeholder="验证码" type="text" style="width:110px;float:left;margin:0;" name="code"/>
				<div class="sendValiReg" style="padding-left: 0;margin: 0;display: none; border: none;" id="smsCode">
					<button id="sended" type="button" style="background: none;color: #00ceff;position: relative; border:1px solid #00ceff;" onclick="reSend()">发送验证码</button>
                    <button id="sending" type="button" style="background: none;color: #c9cfd6;position: relative; border: 1px solid #cfcfcf;display: none;">59秒重新发送</button>
				</div>
				<div class="changePicReg" style="margin:0;padding:0;" id="picCode">
					<img src="/authImage?n=regCode" alt="" style="width:85px;height: 40px;border: none;" onclick="randomPicCode()"/>
					<button type="button" onclick="randomPicCode()">换一张</button>
				</div>  
			</div> 
			<b style="text-align:left;padding-left: 0px;font-weight: normal;">
				<em style="margin-top:-10px;padding-left: 0px;">
					<span class="checkSwitch" style="display: inline-block; width: 15px; height: 15px;">
						<img src="/res/images/checkBoxRadio/noCheck.jpg" onclick="read(this)" style="display:none;vertical-align: top;" data-id="hasRead" data-value="false"/>
						<img src="/res/images/checkBoxRadio/a_18.jpg" onclick="read(this)" data-id="hasRead" data-value="true" style="vertical-align: top;"/>
					</span>
                    <input type="hidden" name="hasRead" id="hasRead" value="true"/>
                    我已阅读并同意<a style="clear:both; color: #00a8e6;font-size: 14px;" href="/sysfoot/helpCenter?id=3287" target="_blank">《安装通注册协议》</a>
				</em>
			</b>
			<button type="button" onclick="register();">立即注册</button>
			<b style="font-weight: normal;">已有账号，<a href="javascript:void(0);" style="color:#00b1db;" onclick="switchToL(this)">点击登录</a></b>
		</div>
		<div class="inputDiv loginForm" style="top: 0;[#if type?? && type == 'register']left:-350px;[#else]left:25px;[/#if]">
			<h6>账号登录</h6>
			<small style="visibility: hidden;" id="loginError">
				<img src="/res/images/oparaStatus/noticeCl_11.jpg"/>
				<span style="margin-left: 10px;"></span>
			</small>
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
				<input type="text" placeholder="手机/邮箱" id="loginAccont" name="username" style="border: none;" onblur="loginVali()"/> 
			</div>  
			<div style="padding-left: 0px;overflow: hidden;border:1px solid #cfcfcf;">
			<input type="password" placeholder="密码" id="password" name="password" style="border: none;"/> 
			</div> 
			<em style="padding-left: 0px;">
			<span class="checkSwitch" style="display: inline-block; width: 15px; height: 15px;">
				<img src="/res/images/checkBoxRadio/noCheck.jpg" onclick="read(this)" style="display:none;vertical-align: top;" data-id="rememberMe" data-value="false"/>
				<img src="/res/images/checkBoxRadio/a_18.jpg" onclick="read(this)" data-id="rememberMe" data-value="true" style="vertical-align: top;"/>
			</span>
                <input type="hidden" name="rememberMe" id="rememberMe" value="true"/>
                下次自动登录
				<a href="/user/iforgot" style="color:#00ceff;float: right;">忘记密码？</a>
			</em>
			<button type="button" onclick="login()">登录</button>
			<b style="font-weight: normal;">还没有账号？<a href="javascript:void(0);" style="color:#00b1db;" onclick="switchToR(this, '18951630791')">立即注册</a></b>
		</div>
	  </div>  
	  </div>
  <div class="foot">
	<div class="footCot">
		<a href="/sysfoot/helpCenter?id=3287" target="_blank">服务条款&nbsp;&nbsp;|&nbsp;&nbsp;</a>
		<a href="/sysfoot/helpCenter?id=3288" target="_blank">关于我们&nbsp;&nbsp;|&nbsp;&nbsp;</a>
		<a href="/sysfoot/helpCenter?id=3283" target="_blank">联系我们&nbsp;&nbsp;|&nbsp;&nbsp;</a>
		<a href="/sysfoot/helpCenter" target="_blank">帮助中心</a>
	</div>
	<h6 class="footCot" style="height:30px;line-height:30px;color:#999999;">
		 沪ICP备15024004号-1 © 2015-2017 azt365.com 版权所有
	</h6>
  </div>
  <script type="text/javascript" src="/res/js/common/jquery.1.9.1.min.js"></script>
  <script type="text/javascript" src="/res/js/common/js.cookie.js"></script>
  <script type="text/javascript" src="/res/js/common/util.js"></script>
  <script type="text/javascript" src="/res/third/layer/layer.js"></script>
  <script type="text/javascript">
      var COOKIE_NAME = "${FrontGlobals.REGISTER_SMS_COOKIE!}";
      var interval ;
	  var isLogin  = true;
	  
      $(function() {
        [#if type?? && type == 'register']
            isLogin = false;
        [/#if]

          var countdown = Cookies.get(COOKIE_NAME, {path: '/'});	//倒计时
          if(countdown && countdown > 0) {
              showSending(countdown);
              interval = setInterval("backSec()", 1000);
          } else {
              showSended(); 
          	}  
          $(".logiinBody").height($(window).height()-150); 
      });

	//绑定回车
      $(document).keydown(function(e) {
          if(e.keyCode == 13) {
              if(isLogin) {
                  login();
              } else {
                  register();
              }
          }
      });

      function backSec() {
          var countdown = Cookies.get(COOKIE_NAME, {path: '/'});
          if(countdown > 0) {
              countdown--;
              if (countdown == 0) {
                  showSended();
                  Cookies.remove(COOKIE_NAME, {path: '/'});
                  clearInterval(interval);
              } else {
				  showSending(countdown);
                  Cookies.set(COOKIE_NAME, countdown, {path: '/'});
              }
          }
      }

      function reSend() {
          var countdown = Cookies.get(COOKIE_NAME, {path: '/'});	//倒计时
          if(!countdown || countdown == 0) {
              var username = $('.regForm input[name=username]').val();
			  if(checkUserNameForRegister(false)) {
                  $.ajax({
                      url: '/user/sendRegisterSMS',
                      type: 'post',
                      dataType: 'json',
                      data: {phone: username},
                      success: function (data) {
                          if (data && data.success) {
                              showSending(Cookies.get(COOKIE_NAME, {path: '/'}));
                              interval = setInterval("backSec()", 1000);
                          } else {
                              showRegisterError("发送验证码失败");
                          }
                      },
                      error : function() {
                          showRegisterError("发送验证码失败");
                      }
                  });
              }
          }
      }

      function randomPicCode() {
          $('#picCode img').prop('src', '/authImage?n=regCode&r=' + Math.random());
      }

	  function login() {
		  var username = $.trim($('#loginAccont').val());
		  var password = $('#password').val();
          var rememberMe = $('#rememberMe').val();

		  if($.trim(username) == '') {
			  showLoginError('请输入手机号或邮箱');
			  return;
		  }
		  if($.trim(password) == '') {
			  showLoginError('请输入密码');
			  return;
		  }
		  if(!isMobile(username) && !isEmail(username)) {
			  showLoginError("请输入手机号或邮箱");
			  return;
		  }

          $.ajax({
              url : '/user/login',
              type : 'post',
              dataType : "json",
              data : {username : username, password : password, rememberMe : rememberMe},
              beforeSend : function() {
                  layer.load(2, {shade: 0.1});
              },
              success : function(data) {
                  if(data.success) {
                  [#if RequestParameters['redirect']?exists]
                      window.location.replace(decodeURIComponent('${RequestParameters['redirect']!}'));
                  [#else]
                      window.location.replace('/user/userCenter');
                  [/#if]
                  } else {
                      if(data.obj) {
                          window.location.href = data.obj;
                      } else {
                          showLoginError(data.msg);
                      }
                  }
              },
              error : function() {
                  showLoginError("登录失败");
              },
              complete : function() {
                  layer.closeAll();
              }
          });
	  }

	  /**
	   * 检测账户名是否可以注册
	   * */
	  function checkUserNameForRegister(async) {
          var username = $.trim($('.regForm input[name=username]').val());
          if(isMobile(username)) {
              $('#smsCode').show();
              $('#picCode').hide();
          } else {
              $('#smsCode').hide();
              $('#picCode').show();
          }
		  if($.trim(username) == '') {
			  showRegisterError('请输入手机号或邮箱');
			  return false;
		  }
		  if(!isMobile(username) && !isEmail(username)) {
			  showRegisterError('手机/邮箱格式不正确，请重新输入');
			  return false;
		  }
		  var flag = false;
          $.ajax({
              url : '/user/checkUserNameForRegister',
              type : 'post',
              dataType : "json",
              async : async,
              data : {username : username},
              beforeSend : function() {
                  layer.load(2, {shade: 0.1});
              },
              success : function(data) {
                  if(data.success) {
					  clearRegisterError();
					  flag = true;
                  } else {
					  showRegisterError(data.msg);
                  }
              },
              complete : function() {
                  layer.closeAll();
              }
          });
		  return flag;
	  }
 function loginVali(){
	 var userName2= $.trim($('.loginForm input[name=username]').val());
	 if(!isMobile(userName2) && !isEmail(userName2)) {
          showLoginError('手机/邮箱格式不正确，请重新输入');
		  return false;
	  } else {
        clearLoginError();
     }
 }
	  function register() {
          var username = $('.regForm input[name=username]').val();
		  var password = $('.regForm input[name=password]').val();
          var code = $('.regForm input[name=code]').val();
          var hasRead = $('.regForm input[name=hasRead]').val();
		  if(!checkUserNameForRegister(false)) {
			  return;
		  }
		  if(password == '') {
			  showRegisterError('请输入密码');
			  return;
		  }
		  if(password.indexOf(' ') >= 0) {
			  showRegisterError('密码不能包含‘空格’，请重新输入');
			  return;
		  }
		  if(password.length < 6 || password.length > 20) {
              showRegisterError('密码为6-20个字符，可由英文、数字及符号组成');
              return;
		  }
		  if($.trim(code) == '') {
			  showRegisterError('请输入验证码');
			  return;
		  }
          if(hasRead != 'true') {
              showRegisterError('需同意协议');
              return;
          }
          $.ajax({
              url : '/user/register',
              type : 'post',
              dataType : "json",
              data : {username : username, password : password, code : code, hasRead : hasRead},
              beforeSend : function() {
                  layer.load(2, {shade: 0.1});
              },
              success : function(data) {
                  if(data.success) {
                      if(data.obj) {
                          //跳转激活页面
                          window.location = data.obj;
                      } else {
                          window.location.replace('/user/regSuccess');
                      }
                  } else {
                      showRegisterError(data.msg);
                  }
              },
              error : function() {
                  showRegisterError('注册失败');
              },
              complete : function() {
                  layer.closeAll();
              }
          });
	  }

	function allClear() {
          $('#loginAccont').val('');
          $('#password').val('');

          $('.regForm input[name=username]').val('');
          $('.regForm input[name=password]').val('');
          $('.regForm input[name=code]').val('');

          clearLoginError();
          clearRegisterError();
      }

	  /**
	   * 显示登录错误提示
	   * */
	  function showLoginError(msg) {
		  $('#loginError span').html(msg); 
          $('#loginError').css("visibility","visible");
	  }

	  /**
	   * 清除登录错误提示
	   * */
	  function clearLoginError() {
          $('#loginError span').html('');
          $(".telLogin").css('top', '');
          $(".passReg").css('top', '');
          $('#loginError').css("visibility","hidden");
	  }

	  function showRegisterError(msg) {
          $('#registerError span').html(msg);
          $('#registerError').css("visibility","visible");
      }

	  function clearRegisterError() {
          $('#registerError span').html('');
          $('.tel').css("top", '');
          $('.pass').css("top", '');
          $(".vali").css("top","");
          $('#registerError').css("visibility","hidden");
	  }

      //登录/注册动画
      function specity(o){
          $(".inputDiv small").css("visibility","hidden");
          $(o).parents(".inputDiv").animate({"left":"-350px"},"slow");
          $(o).parents(".inputDiv").siblings(".inputDiv").animate({"left":"25px"},"slow"); 
      }
      /*切换登录/注册*/
      function switchToR(o){
          specity(o);
          //document.getElementById("regsAccont").focus();
          $(".top big").html("注册");
          allClear();
          isLogin = false;
      }
      function switchToL(o) {
          specity(o);
          //document.getElementById("loginAccont").focus();
          $(".top big").html("欢迎登录");
          allClear();
          isLogin = true;
      }

      //跳转到登录框中，并自动填写帐号
      function toLogin(username) {
          $('.regForm a:last').click();
          $('#loginAccont').val(username);
      }

      function read(o) {
          $(o).siblings("img").show();
          $(o).hide();
          var id = $(o).siblings("img").attr('data-id');
          var value = $(o).siblings("img").attr('data-value');
          $('#' + id).val(value);
      }

      /**
       * 显示发送倒计时
       * */
      function showSending(countdown) {
		  $('#sended').hide();
		  $('#sending').show();
		  $('#sending').html(countdown + "秒重新发送");
      }

      /**
       * 显示重新发送按钮
       * */
      function showSended() {
          $('#sended').show();
          $('#sending').hide();
      }
  </script>
  </body>
  
<script>
(function(){
    var bp = document.createElement('script');
    var curProtocol = window.location.protocol.split(':')[0];
    if (curProtocol === 'https') {
        bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';        
    }
    else {
        bp.src = 'http://push.zhanzhang.baidu.com/push.js';
    }
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(bp, s);
})();
</script>
<div class="cnzz" style="display:none;"><script src="http://s11.cnzz.com/z_stat.php?id=1256097295&web_id=1256097295" type="text/javascript"></script></div>
  
</html>